<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改结算单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-statement-edit" th:object="${statement}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户姓名：</label>
                <div class="col-sm-8">
                    <input name="customerName" th:field="*{customerName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系方式：</label>
                <div class="col-sm-8">
                    <input name="customerPhone" th:field="*{customerPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">到店时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="actualArrivalTime" th:value="${#dates.format(statement.actualArrivalTime, 'yyyy-MM-dd HH:mm')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">车牌号码：</label>
                <div class="col-sm-8">
                    <input name="licensePlate" th:field="*{licensePlate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">汽车类型：</label>
                <div class="col-sm-8">
                    <input name="carSeries" th:field="*{carSeries}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务类型：</label>
                <div class="col-sm-8">
                    <select name="serviceType" class="form-control m-b" th:with="type=${@dict.getType('cmi_service_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{serviceType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注信息：</label>
                <div class="col-sm-8">
                    <textarea name="info" class="form-control">[[*{info}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "business/statement";
        $("#form-statement-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-statement-edit').serialize());
            }
        }

        $("input[name='actualArrivalTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii",
            autoclose: true
        });
    </script>
</body>
</html>